import java.util.Arrays;
import java.util.Scanner;

public class 飞行员兄弟 {
    static int N = 4;
    static int n = 0;
    static char[][] arr = new char[N][N];
    static char[][] backup = new char[N][N];//背景

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        for(int i=0;i<4;i++) arr[i] = s.nextLine().toCharArray();
         int[][] tmp = new int[100000][100000] ;

        for(int op=0;op< 1<<16;op++) {
            int[][] coordinate = new int[100000][100000];

            //数组拷贝
            for(int i=0;i<4;i++) backup[i]=Arrays.copyOf(arr[i],4);

                 for(int i=0;i<4;i++)
                    for(int j=0;j<4;j++) {
                        if(((op >> getLoaction(i,j) )&1) ==1) {
                            turn_on(i,j);
                            setCoordinate(coordinate,i,j);
                        }
                    }

            boolean turn_on =true;
            for(int i=0;i<4;i++)
                for(int j=0;j<4;j++) {
                    if(arr[i][j]=='+') {
                        turn_on = false;
                        break;
                    }
                }

            for(int i=0;i<4;i++) arr[i]=Arrays.copyOf(backup[i],4);

            if(turn_on) {
                if(tmp.length==0 || coordinate.length<tmp.length) tmp=coordinate;

            }

            else continue;
        }
        System.out.println(tmp.length);
        for(int i=0;i<tmp.length;i++)
            System.out.println(tmp[i][0]+" "+tmp[i][1]);


    }
    private static void setCoordinate(int[][]coordinate,int x,int y) {
        coordinate[n++][1] = x+1;
        coordinate[n][1] = y+1;
    }
    private static int getLoaction(int x,int y) {
        return 4*x+y;
    }
    private static void change(int x,int y) {
        if(arr[x][y]=='+') arr[x][y]='-';
        else arr[x][y]='+';
    }
    private static void turn_on(int x,int y) {
        for(int i=0;i<4;i++) {
            change(x,i);
            change(i,y);
        }
        change(x,y);
    }

}
